package com.ProcessManagement;

//    进程中的指令类,类型0要1秒，类型1要2秒
public class Instruction {
    private int instructionNumber;
    private int instructionType;

    public Instruction(int instructionNumber, int instructionType) {
        this.instructionNumber = instructionNumber;
        this.instructionType = instructionType;
    }

    public int getInstructionNumber() {
        return instructionNumber;
    }

    public int getInstructionType() {
        return instructionType;
    }

    public int getInstructionTime() {
        if (instructionType == 0) return 1;
        else if (instructionType == 1) return 2;
        else return -1;
    }
}